<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<!-- <h1>666</h1> -->
	<!-- <p id="p"></p> -->
	<!-- <button onclick="send()">给rn发信息</button> -->
	<script>
	function send(){
		// 给rn传递数据
	    window.postMessage('这是web传的信息！');
	}
	window.onload = function () {
		document.addEventListener('message', function(e) {
	      messagesReceivedFromReactNative += 1;
	      // document.getElementsByTagName('p')[0].innerHTML =
	      //   '从React Native接收的消息: ' + messagesReceivedFromReactNative;
	      // 接收webview传递过来的数据
	      alert(messagesReceivedFromReactNative)
	      var data = e.data;
	      document.getElementById('p').innerHTML = data;
	    });
	    
	}
	</script>
</body>
</html>